
package com.zjff.myshop.admin.pojo.form;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class HomeUpdateForm {

    @ApiModelProperty(value = "首页配置id", position = 0, required = true)
    @NotNull(message = "首页配置Id不能为空 ")
    @Min(value = 1, message = "首页配置Id最小为1 ")
    private Integer id;

    @ApiModelProperty(value = "首页配置类别:1轮播/2为你推荐/3新品上线/4热销商品", position = 1, required = true)
    @NotNull(message = "配置类别Id不能为空 ")
    @Min(value = 1, message = "配置类别Id最小为1 ")
    @Max(value = 4, message = "配置类别Id最大为4 ")
    private Integer typeId;

    @ApiModelProperty(value = "轮播图", position = 2)
    private String img;

    @ApiModelProperty(value = "首页配置商品id", position = 4, required = true)
    @NotNull(message = "商品id不能为空 ")
    private Integer goodsId;

    @ApiModelProperty(value = "首页配置排序值", position = 5, required = true)
    @Min(value = 0, message = "sort最低为0 ")
    @Max(value = 200, message = "sort最高为200 ")
    @NotNull(message = "sort不能为空 ")
    private Integer sort;
}